import request from '@/utils/request'

let url = "charge/select";

export function orderList(param) {
  if (param.patientName === undefined || param.patientName === '') {
    return request({
      url: url + '/' + param.registerNumber,
      method: 'post',
    })
  } else {
    return request({
      url: url + '/' + param.patientName,
      method: 'get',
    })
  }
}

export function registerCode(param) {
  if (param.patientName === undefined || param.patientName === '') {
    return request({
      url: url + '/registerCode/' + param.registerNumber,
      method: 'post',
    })
  } else {
    return request({
      url: url + '/registerCode/' + param.patientName,
      method: 'get',
    })
  }
}

//修改订单状态
export function updateOrder(orderNumber) {
  return request({
    url: 'charge/select/update' + '/' + orderNumber,
    method: 'get'
  })
}
